using Circus.CodeEditor;
using System;
using System.ComponentModel;
namespace Circus.CodeEditor.TextSource
{
	public class LineStyle : BookMark, ILineStyle, IBookMark
	{
		private Range range;
		private int priority;
		public virtual Range Range
		{
			get
			{
				return this.range;
			}
			set
			{
				if (this.range != value)
				{
					this.range = value;
					this.OnRangeChanged();
				}
			}
		}
		public virtual int Priority
		{
			get
			{
				return this.priority;
			}
			set
			{
				if (this.priority != value)
				{
					this.priority = value;
					this.OnPriorityChanged();
				}
			}
		}
		
		protected virtual void OnRangeChanged()
		{
		}
		protected virtual void OnPriorityChanged()
		{
		}
		public LineStyle()
		{
		}
		public LineStyle(int line) : base(line)
		{
		}
		public LineStyle(int line, int ch, int index) : base(line, ch, index)
		{
		}
		public LineStyle(int line, int ch, int index, int priority, Range range) : this(line, ch, index)
		{
			this.priority = priority;
			this.range = range;
		}
		public virtual void Assign(ILineStyle source)
		{
			base.Assign(source);
			this.priority = source.Priority;
			this.range = source.Range;
		}
	}
}
